The invention relates to electronic devices, and, more particularly, to error correction structures and methods.
Digital communication and storage systems typically include error correction coding in order to overcome errors arising from the transmission or storage medium. Forward error-correction coding (FEC) systems add redundancy to the transmitted signal so that the receiver can detect and correct errors using only the received signal. This eliminates the need for the receiver to send requests for retransmission to the transmitter.
FIGS. 1-2 are high level views of a FEC system. In particular, FIG. 1 shows a block of information symbols, I, transformed into a codeword C which is a larger block that contains both the original information and redundant symbols. After transmission over a channel, the received block of symbols can be represented as C+E where E is a block of error symbols. The decoder generates I′ from C+E, and I′ will equal I if the number of errors symbols in E is within the correction capabilities of the code.
FIG. 2 shows a more detailed description of the coding. A block of bk information bits is divided into k groups of b bits and each group of b bits represents a symbol, producing a block of k information symbols for coding. The encoder operates on the block of k information symbols to produce a codeword block of n symbols containing the original information in some form as well as redundancy. The code can be designed so that the redundancy is used for error detection only, error correction only, or a combination of some error detection and some error correction. The codeword block of n symbols is then translated into a block of bn bits and transmitted over the channel. The receiver front-end produces a block of bn bits that might be corrupted, depending upon the amount of channel distortion. The block of bn bits is translated into a block of n symbols and processed with the decoder. As long as the transmission errors lead to at most t=(n−k)/2 erroneous symbols, a hard-decision decoder can reliably recover the input k information symbols (and thus the input bk bits). The price paid for the added redundancy is the increase in the number of symbols to transmit by a factor of n/k. Of course, this means an information decrease by a factor of k/n for a constant transmission rate.
One of the more popular error correction code types is BCH codes which are cyclic block codes that utilize Galois fields beyond the simplest GF(2) (the usual binary {0,1}) to prescribe code generator polynomials. Indeed, a BCH code uses a minimal degree generator polynomial with roots being a sequence of powers of a primitive element of a Galois field which may be an extension field of the symbol field (codeword components' field). This leads to computations involving multiplications of Galois field elements for the usual decoding steps of syndrome calculation, association with error pattern (determine error-locator polynomial and error locations and values), and error correction. Reed-Solomon codes are a subclass of BCH codes with both symbols and generator polynomial roots in the same field GF(pm). The commonly used field GF(2m) allows the elements to be represented as m-bit words.
The nonzero elements of a Galois field form a cyclic multiplicative subgroup and can be expressed as powers of a primitive element α. That is, the elements of GF(pm) are {0, 1, α, α2, . . . , (αq} where the maximum q=pm−2 and αq+1=1. Thus the roots of a generator polynomial G(x) for a BCH code could be {α, α2, . . . , α2t} for a code which can correct t errors per codeword. The generator polynomial thus would be the least common multiple of the polynomials φh(x) for j=1, 2, . . . , 2t where φj(x) is a minimal polynomial for αj. The special case of the symbol field being the same as the root field (Reed-Solomon) implies φj(x) is simply x−αj.
Systematic BCH encoding, as with cyclic codes in general, forms codewords by concatenating the k information symbols with n−k parity symbols which are computed according to Xn−k|(x) modG(x). The additional n−k parity symbols contain the redundant information that is used by the receiver to choose the most likely transmitted k information symbols. In particular, with receiver soft decision the n−k parity symbols can be used to correct t error symbols and detect s erased symbols provided 2t+s is at most equal to n−k. Note that values such as n=204 and k=188 with the field GF(28) in a Reed-Solomon code is a commonly used (shortened) code for high speed modems. Such a (204,188) code can correct 8 error symbols per 204-symbol codeword. Similarly, the (200,192) code can correct 4 errors per 200-symbol codeword.
FIG. 3 is a flow chart for a commonly-used method of errors-only decoding BCH coded information and which proceeds as follows. Take n−k=2t so that at most t errors can be corrected in a codeword of n symbols. The received polynomial R(x)=C(x)+E(x) where C(x) is the codeword polynomial and E(x) is the error polynomial. E(x)=Σjejxj with a non-zero ej the error occurring in the jth position (symbol) of C(x). The decoder is to find the error positions and values to reconstruct E(x) and then recover C(x) as R(x)−E(x). The method first evaluates R(x)=r0xn−1+r1xn−2+ . . . +rn−1 at the 2t roots of the code generator polynomial (G(x)=πj(x−αj) for Reed-Solomon) and denotes these 2t evaluations as the syndromes S0, S1, S2, . . . , S2t−1. That is, with the roots of G(x) being αj for j=0, 1, 2, . . . , 2t−1 (which are denoted β0, β1, β2, . . . β2t−1, respectively) the syndromes are (with * denoting Galois field multiplication):S0=r0*β0n−1+r1*β0n−2+r2*β0n−3+ . . . +rn−2*β0+rn−1 S1=r0*β1n−1+r1*β1n−2+r2*β1n−3+ . . . +rn−2*β1+rn−1 . . .S2t−1=r0*β2t−1n−1+r1*β2t−1n−2+r2*β2t−1n−3+ . . . +rn−2*β2t−1+rn−1 Because C(x) is a product of G(x), C(x) vanishes at each of the 2t roots of G(x), and the syndrome Sj equals E(βj). Thus the 2t syndrome equations are nonlinear relations between the 2t syndromes, the at most t error locations, and the at most t error values; that is, 2t nonlinear equations for at most 2t unknowns.
Next, linearize these nonlinear syndrome equations by introduction of the error locator polynomial, Λ(x)=πm(1+Xmx)=1+ΣmΛmXm, where Xm is the mth error location. The error locator polynomial has degree equal to the (not-yet-known) number of errors. That is, Xm=αj for the mth j for which ej is nonzero, and the roots of Λ(x) are the inverses of the error locations.
Multiplying the defining equation for Λ(x) by the error values and powers of the error locations and summing leads to n−k−e linear equations for the e unknowns Λj with coefficients of these linear equations being an array of the syndromes S0 to S2e−2 and the inhomogeneous terms being the sequence of syndromes Se to S2e−1. The number of errors, e, is unknown, so the linear equations cannot be simply solved. Rather, the method of FIG. 3 uses the iterative and inductive Berlekamp-Massey method to find the Λj.
Once the locator polynomial is known, find its roots (the inverses of the error locations) using the Chien search. The Chien search systematically evaluates the locator polynomial Λ(x) at all 255 non-zero possible values of the variable and checks for zeros by repeatedly computing Λ(αj) and incrementing j.
Inserting the error locations into the definitions of the syndromes yields simple linear equations for the error values. In fact, the Forney algorithm in FIG. 3 computes the error values without matrix inversion to solve the linear equations. And combining the error values and error locations reconstructs the error polynomial E(x) to subtract from R(x) and lastly recover error-free C(x).
However, efficient computation of the syndromes has problems for systems, especially for systems in which the code (generator polynomial) may change and parallel multiplication is available.